package voyager.holodeck.car;

import org.jiopi.framework.CentralConsole;
import org.jiopi.framework.FrameworkInitializer;
import org.jiopi.framework.ModuleConsole;
import org.jiopi.framework.ControlPanel;
import star.trek.voyager.blueprint.car.Car;
//import org.apache.log4j.Logger;

public class JIOPiAssembling {
	
	//private static Logger logger = Logger.getLogger(JIOPiAssembling.class);
	
	private static ModuleConsole car = CentralConsole.accessModuleConsole("voyager.benz.car_sls_amg", "0.1.0.0");
	
	public static void defaultBenzSlsAmgShow(){
		Car benzSlsAmg =  car.accessControlPanel(Car.class.getName(), Car.class);
		System.out.println("-----benzSlsAmg.getStatus-----");
		System.out.println(benzSlsAmg.getStatus());
		System.out.println("=====benzSlsAmg.getStatus=====");
	}
	
	public static void benzSlsAmgWithEngineV9Show(){
		Car benzSlsAmgWithV9 = car.accessControlPanel(Car.class.getName()+"?v9", Car.class);
		System.out.println("-----benzSlsAmgWithV9.getStatus-----");
		System.out.println(benzSlsAmgWithV9.getStatus());
		System.out.println("=====benzSlsAmgWithV9.getStatus=====");
	}
	
	public static void benzSlsAmgWithEngineV9ControlPanelShow(){
		ControlPanel benzSlsAmgWithV9 = car.accessControlPanel("voyager.car?v9", ControlPanel.class);
		System.out.println("-----benzSlsAmgWithEngineV9ControlPanelShow.getStatus-----");
		System.out.println(benzSlsAmgWithV9.operate("getStatus", String.class));
		System.out.println("=====benzSlsAmgWithEngineV9ControlPanelShow.getStatus=====");
	}
	
	public static void main(String[] args) {
		FrameworkInitializer.initialize();
		
		//get a default BenzSlsAmg
		System.out.println("-----defaultBenzSlsAmgShow-----");
		defaultBenzSlsAmgShow();
		System.out.println("=====defaultBenzSlsAmgShow=====");
		
		System.out.println("-----benzSlsAmgWithEngineV9Show-----");
		benzSlsAmgWithEngineV9Show();
		System.out.println("=====benzSlsAmgWithEngineV9Show=====");
		
		System.out.println("-----benzSlsAmgWithEngineV9ControlPanelShow-----");
		benzSlsAmgWithEngineV9ControlPanelShow();
		System.out.println("=====benzSlsAmgWithEngineV9ControlPanelShow=====");
		
	}
}
